//http://tb1.bdstatic.com/??/tb/_/preview_e43ce97.js,/tb/_/tb_skin_1cfab79.js,/tb/_/frs-footer/frs_from_guide_55b4caa.js,/tb/_/tbshare_popup_a9745dd.js,/tb/_/aside_float_bar_121fac3.js,/tb/_/frs-footer/aside_float_btns_f53982c.js,/tb/_/inform_manager_verify_phone_f5289a5.js,/tb/_/icon_tip_925c28b.js,/tb/_/firework_v2_43f8946.js,/tb/_/novel_icons_5f06004.js,/tb/_/global_notice_8f03246.js,/tb/_/umoney_promotion_dialog_0174dae.js,/tb/_/dialog_d31c70c.js,/tb/_/util_fdb7481.js,/tb/_/cont_sign_card_641fc4e.js,/tb/_/net_proxy_f5ecab7.js,/tb/_/use_controller_e92bca8.js,/tb/_/buy_controller_516c900.js,/tb/_/tieba_sign_card_f938fb7.js
//右部悬框

_.Module.define({
	path: "tbui/widget/preview",
	sub: {
		defaultOptions: {
			url: "/toms/setPreviewData"
		},
		initial: function(t) {
			t = $.extend({}, this.defaultOptions, t), this.options = t
		},
		setPreviewData: function(t, i) {
			var e = this;
			t && "function" == typeof i && $.post(e.options.url, t, i, "json")
		}
	}
});
_.Module.define({
	path: "tbui/widget/tb_skin",
	sub: {
		initial: function(i, s) {
			if(i) {
				var n = ["//tb1", ".bdstatic.com/tb/cms/common/tbskin/skins/skin_", i, ".css?v=", s].join("");
				$('<link id="css_skin" href="' + n + '" rel="stylesheet">').appendTo("head"), $("body").addClass("skin_" + i)
			}
		}
	}
});
_.Module.define({
	path: "frs-footer/widget/frs_from_guide",
	sub: {
		initial: function() {
			var t = $.tb.location.getSearchValue().fr;
			"shortcut" == t && $.stats.track("\u684c\u9762\u5feb\u6377\u65b9\u5f0f_\u8fdb\u5165", "\u65b0\u7528\u6237\u7559\u5b58", "frs", "show")
		}
	}
});
_.Module.define({
	path: "tbui/widget/tbshare_popup",
	requires: ["tbui/widget/tbshare_share"],
	sub: {
		_tmp: ['<div class="tbshare_popup_wrapper">', '<div class="tbshare_popup_enter"></div>', '<div class="tbshare_popup_main clearfix"></div>', "</div>"].join(""),
		_sharebase_args: {
			theme: "coco",
			targets: ["tieba", "weixin", "tsina", "qqzone", "copy"],
			initialQrcode: !1
		},
		_popup_args: {
			$container: null,
			type: "cross"
		},
		initial: function(e) {
			if(!e) throw new Error("no tbMore args provided");
			this._popup_args = $.extend(this._popup_args, {
				$container: e.$container,
				type: e.type
			}), this._sharebase_args = $.extend(this._sharebase_args, {
				shareContent: e.shareContent || {},
				targets: e.targets,
				type: e.type
			}), this.$dom = this._createBaseDom(), this.$popupWrapper = this._createBaseMoreWrapper(), this._bindEvents(), this._popup_args.$container.append(this.$dom)
		},
		_createBaseDom: function(e) {
			e = e || "";
			var t = this._tmp,
				s = $(t);
			return "vertical" == this._popup_args.type && s.addClass("popup_vertical"), s
		},
		_createBaseMoreWrapper: function() {
			return this.shareInstance = this.requireInstance("tbui/widget/tbshare_share", [this._sharebase_args]), this.shareInstance.$dom.appendTo(this.$dom.find(".tbshare_popup_main")), this.$dom.find(".tbshare_popup_main")
		},
		_qrcodeShow: function() {
			this.shareInstance.getQrcode().show(), this.shareInstance.$dom.find(".tbshare_weixin").addClass("hover_on_qrcode")
		},
		_qrcodeHide: function() {
			this.shareInstance.getQrcode().hide(), this.shareInstance.$dom.find(".tbshare_weixin").removeClass("hover_on_qrcode")
		},
		_bindEvents: function() {
			var e = this;
			this.$dom.on("mouseenter", ".tbshare_popup_main li", function() {
				$(this).find(".tbshare_weixin").length ? e._qrcodeShow() : e._qrcodeHide()
			}), this.$dom.on("mouseenter", function(t) {
				$(this).find($(t.relatedTarget)).length || !$(t.relatedTarget).parent().length, e._qrcodeHide(), e.$popupWrapper.show()
			}), this.mouseenterInFlash = !1, this.$dom.on("mouseleave", function(t) {
				var s = t.relatedTarget;
				if(s) {
					if(s == e.shareInstance.copyElement) return e.mouseenterInFlash = !0, void 0
				} else if(e.mouseenterInFlash) return;
				e.$popupWrapper.hide(), e._reinitialCopy()
			});
			var t = $(this.shareInstance.copyElement);
			t.parent().on("mouseleave", function(t) {
				var s = t.relatedTarget;
				e.args.$container.removeClass("copy_mouse_hover"), e.$dom.find($(s)) || (e.mouseenterInFlash = !1)
			}), t.parent().on("mouseenter", function() {
				e.args.$container.addClass("copy_mouse_hover")
			})
		},
		_reinitialCopy: function() {
			this.$dom.find(".tbshare_copy .tbshare_title_box").removeClass("copy_done"), this.$dom.find(".tbshare_copy .tbshare_title_box").html("\u590d\u5236\u94fe\u63a5")
		},
		_setCopyCallback: function() {
			var e = this;
			e.shareInstance.tbcopy.setSuccessCallback(function() {
				e.$dom.find(".tbshare_copy .tbshare_title_box").addClass("copy_done"), e.$dom.find(".tbshare_copy .tbshare_title_box").html("\u5df2\u590d\u5236\u94fe\u63a5")
			})
		},
		show: function() {
			this.$dom.show()
		},
		hide: function() {
			this.$dom.hide()
		},
		showMore: function(e, t) {
			return "undefined" != typeof e && "undefined" != typeof t && this.$moreWrapper.css({
				left: e,
				top: t
			}), this.$moreWrapper.show(), this.$moreWrapper
		},
		hideMore: function() {
			this.$moreWrapper.hide()
		},
		setShareContent: function(e) {
			return this.shareInstance.setShareContent(e), this
		}
	}
});
_.Module.define({
	path: "tbui/widget/aside_float_bar",
	requires: ["tbui/widget/tbshare_popup", "tbui/widget/bubble_tip"],
	sub: {
		initial: function(t) {
			"undefined" != typeof PDC && PDC.mark("c_afbavi"), this.options = t, this.$root = $('<ul class="tbui_aside_float_bar"></ul>');
			for(var e = 0, i = t.buttons.length; i > e; e++) {
				var a = t.buttons[e];
				this.addButton(a)
			}
			this.$root.appendTo("body");
			var o = this;
			o.relocate(), $(window).resize(function() {
				o.relocate()
			});
			var r = PageData.product || PageData.page;
			if("pb" == r && this.$root.find(".tbui_fbar_favor").on("mouseenter", function() {
					$.stats.track("PB\u60ac\u6d6e\u7231\u901b\u7684\u5427", "\u8d34\u5427PC\u9875\u9762\u4f18\u5316", "pb", "click"), $(this).find(".tbui_aside_favor_list a").one("click", function() {
						$.stats.track("PB\u60ac\u6d6e\u7231\u901b\u5427\u5c55\u5f00\u5427", "\u8d34\u5427PC\u9875\u9762\u4f18\u5316", "pb", "click")
					})
				}), "frs" == r || "pb" == r || "pb_bright" == r) {
				if("frs" == r) {
					var n = ["\u53d1\u5e16", "\u5237\u65b0", "\u5206\u4eab", "\u7231\u901b\u7684\u8d34\u5427", "\u5b9e\u9a8c\u5ba4", "\u8fd4\u56de\u9876\u90e8"];
					1 === this.options.isBottle && n.unshift("\u6f02\u6d41\u74f6"), n.unshift("\u4e0b\u8f7d\u4e8c\u7ef4\u7801")
				} else var n = ["\u9b54\u6cd5\u9053\u5177", "\u795e\u6765\u4e00\u53e5", "\u5206\u4eab", "\u7231\u901b\u7684\u8d34\u5427", "\u5b9e\u9a8c\u5ba4", "\u53ec\u5524\u5ea6\u5a18", "\u8fd4\u56de\u9876\u90e8"];
				r = "pb" == r || "pb_bright" == r ? "pb" : "frs", this.$root.delegate(".tbui_aside_fbar_button", "mouseenter", function(t) {
					var e = $(t.target),
						i = e.parent().index();
					$.stats.track(n[i] + "\u70b9\u51fb\u91cf", "FRS/PB\u53f3\u4fa7\u5de5\u5177\u680f\u7edf\u8ba1", r, "click")
				}), this.$root.delegate(".tbui_fbar_post", "mousedown", function() {
					$.stats.track("frs\u53f3\u4fa7\u53d1\u5e16\u6309\u94ae\u70b9\u51fb\u91cf", "\u65b0\u53d1\u8d34\u4f18\u5316\u7edf\u8ba1", r, "click")
				})
			}
			1 === this.options.isBottle && this.options.isNewBottle > 0 ? $.stats.track("pb\u5927\u56fe\u5165\u53e3", "pc\u6f02\u6d41\u74f6", r, "view") : 1 === this.options.isBottle && 0 === this.options.isNewBottle && $.stats.track("\u805a\u5408\u9875\u5165\u53e3", "pc\u6f02\u6d41\u74f6", r, "view")
		},
		addButton: function(t) {
			var e = $($.tb.format('<li class="tbui_aside_fbar_button tbui_fbar_#{btnName}"><a href="#"></a></li>', {
					btnName: t
				})),
				i = this["_" + t];
			i && i.call(this, e) && this.$root.append(e);
			var a = this;
			$("body").click(function() {
				a.hidePanel()
			})
		},
		hidePanel: function() {
			$("#bdshare_tb_l").hide(), $(".tbui_aside_smiley").hide(), $("#tbui_aside_favor_list").hide(), $(".tbui_aside_props_list").hide()
		},
		relocate: function() {
			$(window).width() < 1105 ? this.$root.addClass("tbui_afb_compact") : this.$root.removeClass("tbui_afb_compact")
		},
		_square: function(t) {
			return t.children().tbattr("href", "/f?kw=%D0%E3"), t.children().tbattr("target", "_blank"), !0
		},
		_bottle: function(t) {
			var e = this,
				i = PageData.product || PageData.page;
			return this.bottleBubble(t), t.children().tbattr("javascript:;"), t.children().click(function() {
				$.stats.track("pb\u5927\u56fe\u5165\u53e3", "pc\u6f02\u6d41\u74f6", i, "click"), location.href = "/bottle/photopbPage?thread_id=" + e.options.bottleTid
			}), !0
		},
		_nobottle: function(t) {
			var e = PageData.product || PageData.page;
			return this.bottleBubble(t), t.children().tbattr("href", "javascript:;"), t.children().click(function() {
				$.stats.track("\u805a\u5408\u9875\u5165\u53e3", "pc\u6f02\u6d41\u74f6", e, "click"), location.href = "/bottle/bottlesPage"
			}), !0
		},
		_top: function(t) {
			var e = $(window);
			0 == e.scrollTop() && t.css("visibility", "hidden"), t.click(function(t) {
				function i() {
					o = Math.floor(o / 2), window.scrollTo(0, o), o > 2 ? a = setTimeout(i, 40) : (window.scrollTo(0, 0), clearTimeout(a))
				}
				t.preventDefault();
				var a = null,
					o = e.scrollTop();
				$.browser.msie ? window.scrollTo(0, 0) : i()
			});
			var i, a = !1;
			return e.bind("scroll", function() {
				i && clearTimeout(i), i = setTimeout(function() {
					e.scrollTop() > 0 ? 0 == a && (t.css("visibility", "visible"), a = !0) : a && (t.css("visibility", "hidden"), a = !1)
				}, 500)
			}), !0
		},
		_refresh: function(t) {
			return t.click(function() {
				return $.tb.location.reload(), !1
			}), !0
		},
		_post: function(t) {
			var e = this;
			return e.options.dealTab && $(".j_publish").length ? t.children().tbattr("href", $(".j_publish").tbattr("href").replace(/&amp;/g, "&")).tbattr("target", "_blank") : (t.children().tbattr("href", "#sub"), t.click(function(t) {
				t.preventDefault(), t.stopPropagation(), setTimeout(function() {
					e.fire("wanna_post")
				}, 50)
			})), !0
		},
		_share: function(t) {
			return this.requireInstance("tbui/widget/tbshare_popup", [{
				$container: t.find("a")
			}]), !0
		},
		_radar: function(t) {
			var e = this;
			return t.find("a").append('<img src="../../static/img/toolbar/radar.gif" class="tbui_radar_img" />'), t.find("a").tbattr({
				href: $.tb.unescapeHTML(e.options.radarData && e.options.radarData.link),
				target: "_blank"
			}), t.on("mousedown", "a", function() {
				$.stats.track("radar", "radar_banner")
			}), $.browser.msie && 7 == $.browser.version && t.css("marginBottom", "-4px"), $.browser.msie && 6 == $.browser.version && (t.append("<div></div>"), t.css("marginBottom", "-3px")), !0
		},
		_tsukkomi: function(t) {
			var e = this;
			$.browser.msie && 7 == $.browser.version && t.css("marginBottom", "-4px"), $.browser.msie && 6 == $.browser.version && t.css("marginBottom", "-3px").append("<div></div>");
			var i = $('<div class="tbui_aside_smiley"></div>');
			return t.append(i), _.Module.use("common/component/InterestSmiley", {
				container: i,
				smileClass: "t_smile_bg",
				type: "toolbar",
				scrollCss: {
					padding: "9px 0px 0px 0px"
				},
				scrollBarHide: function() {
					i.width(296)
				},
				scrollBarShow: function() {
					i.width(306)
				},
				dataPostor: e.options.dataPostor
			}, function(a) {
				e.interestSmile = a, e.interestSmile.generic(), t.on("mouseenter", function() {
					e.hidePanel()
				}), t.delayhover({
					enterDelay: 300,
					leaveDelay: 700,
					mouseenter: function() {
						i.fadeIn(), e.interestSmile.scrollPanel && e.interestSmile.scrollPanel.setHeight(156)
					},
					mouseleave: function() {
						i.fadeOut()
					}
				}).children("a").click(function(t) {
					t.preventDefault(), t.stopPropagation()
				})
			}), !0
		},
		_favor: function(t) {
			var e = "//tb2.bdstatic.com/tb/img/loading2_a8a93d0.gif";
			if(0 == PageData.user.is_login) return !1;
			var i = PageData.user.id,
				a = "/p/getLikeForum",
				o = [];
			$.browser.msie && 6 == $.browser.version && (t.append("<div></div>"), t.css("marginBottom", "-3px"));
			var r = $('<ul class="tbui_aside_favor_list clearfix" id="tbui_aside_favor_list"></ul>'),
				n = '<li class="j_favor_loading"><div class="favor_loading"><img src="' + e + '">\u6b63\u5728\u52a0\u8f7d\uff0c\u8bf7\u7a0d\u540e\u3002\u3002\u3002</div></li>';
			r.append(n), $.ajax({
				url: a,
				dataType: "json",
				type: "GET",
				data: {
					uid: i
				}
			}).done(function(t) {
				if(t && 0 === t.errno) {
					if(t.data && t.data.info && (o = t.data.info), 0 == o.length) return !1;
					if(o.length > 0) {
						var e, i = o,
							a = !1;
						i.length <= 8 ? e = i.length : (e = 7, a = !0), r.find(".j_favor_loading").hide();
						for(var n = 0; e > n; n++) {
							var s = {
								kw: encodeURIComponent(i[n].forum_name),
								forumName: $.tb.subByte(i[n].forum_name, 12)
							};
							r.append($.tb.format('<li><a href="//tieba.baidu.com/f?ie=utf-8&kw=#{kw}" target="_blank" class="ui_text_summary">#{forumName}</a></li>', s))
						}
						a && r.append('<li><a target="_blank" class="ui_text_desc" href="//tieba.baidu.com/home/forum?id=' + PageData.user.portrait + '" class="aside_float_favforum_more">\u66f4\u591a&gt;&gt;</a></li>')
					}
				}
			}), r.hide().appendTo(t);
			var s = this;
			return t.on("mouseenter", function() {
				s.hidePanel()
			}), t.delayhover({
				enterDelay: 300,
				leaveDelay: 700,
				mouseenter: function() {
					r.fadeIn()
				},
				mouseleave: function() {
					r.fadeOut()
				}
			}).children("a").click(function(t) {
				t.preventDefault(), t.stopPropagation()
			}), !0
		},
		_lab: function(t) {
			t.children().tbattr("target", "_blank").tbattr("href", "//tieba.baidu.com/idea/index");
			var e = $("<div class='tbui_aside_lab_tip'></div>");
			if(t.append(e), $.tb.Storage.remove("close_cm_bubble"), "1" != $.tb.Storage.get("close_mt_bubble") && +new Date < +new Date(2015, 6, 19)) {
				var i = {
						content: "<span class='red-text'>\u5feb\u6377\u952e\u8d34\u5427</span>\u4e0a\u7ebf\u5566\uff0c\u5feb\u6765\u4f53\u9a8c\u5427~",
						arrow_dir: "right",
						bubble_css: {
							top: 0,
							right: 50,
							width: 150
						},
						wrap: e,
						closeBtn: !0
					},
					a = this.requireInstance("tbui/widget/bubble_tip", i);
				a.bind("onclose", function() {
					$.tb.Storage.set("close_mt_bubble", "1", (new Date).getTime() + 6048e5), a.closeBubble()
				}), a.j_bubble.show()
			}
			return !0
		},
		_home: function(t) {
			return t.children().tbattr("href", "//www.baidu.com?tn=SE_hldp03460_124vf6k4"), t.children().addClass("j_aside_float_bar_go_home"), t.children().tbattr("target", "_blank"), !0
		},
		_down: function(t) {
			return t.on("mouseenter", function() {
				t.find("a").append('<img src="//tb2.bdstatic.com/tb/img/frsQRCode_6f6cc21.png" class="tbui_pb_qr_code" />')
			}), t.on("mouseleave", function() {
				t.find(".tbui_pb_qr_code").remove()
			}), t.on("click", "a", function() {
				$.stats.track("frs\u4e0b\u8f7d\u4e8c\u7ef4\u7801\u70b9\u51fb", "FRS/PB\u53f3\u4fa7\u5de5\u5177\u680f\u7edf\u8ba1", "pb", "click"), location.href = "//tiebac.baidu.com/c/s/download/pc"
			}), !0
		},
		bottleBubble: function(t) {
			var e = "bottleBubble",
				i = "1",
				a = 30,
				o = ['<div class="tbui_aside_bubble_wrapper">', '<div class="tbui_aside_bubble_word">', "<h6>\u8fd9\u91cc\u662f\u6f02\u6d41\u74f6\uff0c\u8fdb\u53bb\u770b\u770b<h6>", "</div></div>"].join(""),
				r = $(o);
			$.cookie(e) !== i && ($.cookie(e, i, a), r.appendTo(t), setTimeout(function() {
				$(".tbui_aside_bubble_wrapper").hide()
			}, 7e3)), $(".tbui_aside_bubble_wrapper").click(function() {
				t.children().click()
			})
		}
	}
});
_.Module.define({
	path: "frs-footer/widget/aside_float_btns",
	requires: ["tbui/widget/aside_float_bar"],
	sub: {
		initial: function(t) {
			this.options = t;
			var i;
			i = 0 === this.options.isBottle ? "" : 1 === this.options.isBottle && 0 !== this.options.isNewBottle ? "bottle" : "nobottle", this.requireInstance("tbui/widget/aside_float_bar", [{
				buttons: ["down", i, "post", "refresh", "share", "favor", "lab", "top"],
				bottleTid: this.options.bottleTid,
				isBottle: this.options.isBottle,
				isNewBottle: this.options.isNewBottle
			}])
		}
	}
});
_.Module.define({
	path: "ueglib/widget/inform_manager_verify_phone",
	requires: ["ueglib/widget/verify_manager_phone"],
	sub: {
		initial: function(e, i, n) {
			var o = this;
			o._forceMode = n, e && (i ? o._commitRemindTime(function() {
				o._informManager()
			}, null) : o._informManager())
		},
		_commitRemindTime: function(e, i) {
			$.ajax({
				url: "/bawu2/checkphone/commitRemindTime",
				dataType: "json",
				success: function(n) {
					0 === n.errno ? "function" == typeof e && e() : "function" == typeof i && i()
				},
				error: i
			})
		},
		_informManager: function() {
			var e = this;
			this.requireInstance("ueglib/widget/verify_manager_phone", [e._forceMode])
		}
	}
});
_.Module.define({
	path: "user/widget/icon_tip",
	requires: ["tbui/widget/card"],
	sub: {
		_icon_tip: null,
		_icon_tip_ajax: null,
		_dialog: null,
		_iconData: {},
		_option: {
			width: 300
		},
		initial: function(i) {
			this.pageType = i.pageType, this.myIcons = i.myIcons, this.bindEvents(i.pagelet)
		},
		bindEvents: function(i) {
			var t = this,
				n = $("body");
			n.on("mouseenter.icon_tip", ".j_icon_slot", function() {
				t._icon_tip && t._icon_tip.closeCard(), t.buildCard($(this))
			}).on("mouseleave.icon_tip", ".j_icon_slot", function() {
				t._icon_tip && t._icon_tip.closeCard({
					type: "delayClose",
					time: 200
				}), t._icon_tip = null
			}), n.on("click.icon_tip_buy", ".j_buy_icon_btn", function(i) {
				i.preventDefault(), t.getOneIcon(t._iconData)
			}).on("click.icon_tip_manage", ".j_manage_icon_btn", function(i) {
				i.preventDefault(), t.jumpToIhome()
			}), i.on("destroy", function() {
				n.off("mouseenter.icon_tip").off("mouseleave.icon_tip").off("click.icon_tip_buy").off("click.icon_tip_manage")
			})
		},
		buildCard: function(i) {
			var t = this;
			t._icon_tip && (t._icon_tip.closeCard(), t._icon_tip = null);
			var n = i.getData();
			this._iconData = n;
			var o, e, a, c, r, l, _ = _ || 1,
				s = 50,
				p = "//tb1.bdstatic.com/tb/cms/com/icon/";
			if(n.sprite) {
				if(o = n.sprite[n.value], !o)
					for(var u in n.sprite)
						if(n.sprite[u] && (0 != n.value || "meizhi_level" == n.name)) {
							o = n.sprite[u];
							break
						}
				e = o.split(","), a = e[0], c = e[1], l = p + n.category_id + "_36.png?stamp=" + a, r = 'style="background: url(' + l + ") no-repeat -" + c * s + "px  -" + (_ - 1) * s + 'px;"'
			} else r = i.css("background");
			var d = this.getIconTipHtml(n);
			if(!d) return !1;
			null == n.title && (n.title = i.tbattr("title"));
			var f = ['<div class="icon_tip_wrapper">', '<div class="icon_tip_img" ' + r + " />", '<div class="icon_tip_info">', '<div class="icon_tip_title">' + n.title + (d.expired ? d.expired : "") + "</div>", '<div class="icon_tip_intro">' + d.intro + "</div>", '<div class="icon_tip_btns">', d.btn, "</div>", "</div>", "</div>"].join(""),
				g = {
					content: f,
					card_css: {
						width: t._option.width,
						zIndex: $.getcurzIndex()
					},
					auto_positon: !0,
					event_target: i,
					attr: "id='icon_tip'",
					wrap: $("body")
				};
			t._icon_tip = t.requireInstance("tbui/widget/card", g), t._icon_tip.showCard({
				type: "delayShow",
				time: 200
			})
		},
		getOneIcon: function(i) {
			var t = this,
				n = i.name;
			if(n) {
				var o = $.dialog.confirm("\u786e\u5b9a\u8d2d\u4e70\u3010" + i.title + "\u3011\u5370\u8bb0\u561b\uff1f\u5c06\u6d88\u8017\u60a8" + i.price + "T\u8c46", {
					title: "\u8d2d\u4e70\u5370\u8bb0\u63d0\u793a",
					acceptValue: "\u786e\u5b9a",
					cancelValue: "\u53d6\u6d88"
				});
				o.bind("onaccept", function(i) {
					i.stopImmediatePropagation();
					var o = {
						ie: "utf-8"
					};
					o.tbs = PageData.tbs, o.icon_name = n, o.level = 1, t._icon_tip_ajax && t._icon_tip_ajax.abort(), t._icon_tip_ajax = $.ajax({
						type: "post",
						url: "/icon/buyIcon",
						data: o,
						dataType: "json"
					}).success(function(i) {
						if(i && 0 === i.no) {
							var n = i.data;
							return n.icon_info ? (t.showDialog("\u8d2d\u4e70\u6210\u529f"), $.tb.location.reload(), void 0) : (t.showDialog("\u8d2d\u4e70\u51fa\u9519\uff0c\u8bf7\u67e5\u770b\u8d2d\u4e70\u8bb0\u5f55\u786e\u8ba4\u662f\u5426\u8d2d\u4e70\u6210\u529f"), void 0)
						}
						i && 2270028 === i.no ? t.showDialog("T\u8c46\u4e0d\u8db3") : t.showDialog("\u8d2d\u4e70\u51fa\u9519\uff0c\u6ca1\u6709\u8d2d\u4e70\u6210\u529f")
					})
				}).bind("oncancel", function() {})
			}
		},
		getIconTipHtml: function(i) {
			if(null == i.intro || null == i.intro_url) return !1;
			if(this.whetherIHaveTheIcon(i, this.myIcons)) return {
				intro: "<p>" + i.intro + ' <a target="_blank" href="' + i.intro_url + '">\u8be6\u60c5\u300b</a></p>',
				btn: '<a class="btn_default btn_small j_manage_icon_btn " href="" target="_blank" >\u7ba1\u7406\u5370\u8bb0</a>'
			};
			if(null != i.price && 0 != i.price) {
				var t = '<p>\u4ef7\u683c:<i class="icon_tbean" style="vertical-align:middle;"></i><span class="orange_text " >' + i.price + '</span> <a target="_blank" href="' + i.intro_url + '">\u8be6\u60c5\u300b</a></p>';
				return {
					intro: t,
					btn: '<a class="btn_default btn_small j_buy_icon_btn"  >\u8d2d\u4e70\u5370\u8bb0</a>'
				}
			}
			return {
				intro: "<p>" + i.intro + ' <a target="_blank" href="' + i.intro_url + '">\u8be6\u60c5\u300b</a></p>',
				btn: '<a class="btn_default btn_small" target="_blank" href="' + i.intro_url + '" >\u83b7\u53d6\u5370\u8bb0</a>'
			}
		},
		jumpToIhome: function() {
			var i = $(".userinfo_honor"),
				t = i.find(".j_icon_slot");
			$.tb.location.getHref().match("/home/") && i && t ? t.first().trigger("click") : window.open("/home/main?id=" + PageData.user.portrait + "&fr=icon_tip#manage_icon")
		},
		whetherIHaveTheIcon: function(i, t) {
			var n, o;
			for(o in t)
				if(n = t[o], i.name == n) return !0;
			return !1
		},
		showDialog: function(i) {
			this._dialog && this._dialog.close(), this._dialog = null, this._dialog = new $.dialog({
				title: "\u5370\u8bb0\u63d0\u793a",
				html: i
			})
		},
		formateDate: function(i) {
			var t = new Date(1e3 * parseInt(i));
			return t.getFullYear() + "-" + (t.getMonth() + 1) + "-" + t.getDate()
		}
	}
});
_.Module.define({
	path: "encourage-appforum/widget/novel_icons",
	sub: {
		initial: function() {},
		getMonthlyTicketIcon: function() {
			return "<i class='novel-monthly-ticket-icon'></i>"
		},
		getNovelLevelIcon: function(n, e, o) {
			e = e || "", o = o || "";
			var l = "";
			return l = "" === o ? "<i class='novel-level-icon novel-level-" + n + "' title='" + e + "'></i>" : "<a target='_blank' href='" + o + "' class='novel-level-icon novel-level-" + n + "' title='" + e + "'></a>"
		},
		getNovelFamousIcon: function(n) {
			return '<span class="novel-famous-icon">' + n + "</span>"
		},
		getNovelRankIcon: function() {
			var n = void 0 === arguments[0] ? 1 : arguments[0];
			return "<i class='novel-rank-icon novel-rank-" + n + "'></i>"
		},
		getNovelTopFansIcon: function(n) {
			return "<i class='novel-top-fans-icon novel-top-fans-" + n + "'></i>"
		}
	}
});
! function(e) {
	e.idleTimer = function(t, i) {
		var n, a = function() {
			var e, t = function(e, t) {
					return "" !== e ? e + t.slice(0, 1).toUpperCase() + t.slice(1) : t
				},
				i = function() {
					var i = !1;
					return "number" == typeof window.screenX && ["webkit", "moz", "ms", "o", ""].forEach(function(n) {
						0 == i && void 0 != document[t(n, "hidden")] && (e = n, i = !0)
					}), i
				}(),
				n = function() {
					return i ? document[t(e, "hidden")] : void 0
				},
				a = function() {
					return i ? document[t(e, "visibilityState")] : void 0
				};
			return {
				hidden: n(),
				visibilityState: a(),
				visibilitychange: function(t, s) {
					return s = !1, i && "function" == typeof t ? document.addEventListener(e + "visibilitychange", function(e) {
						this.hidden = n(), this.visibilityState = a(), t.call(this, e)
					}.bind(this), s) : void 0
				}
			}
		}(void 0);
		"object" == typeof t ? (n = t, t = null) : "number" == typeof t && (n = {
			timeout: t
		}, t = null), i = i || document, n = e.extend({
			idle: !1,
			timeout: 3e4,
			events: "mousemove keydown wheel DOMMouseScroll mousewheel mousedown touchstart touchmove MSPointerDown MSPointerMove"
		}, n);
		var s = e(i),
			r = s.data("idleTimerObj") || {},
			o = function(t) {
				var n = e.data(i, "idleTimerObj") || {};
				n.idle = !n.idle, n.olddate = +new Date;
				var a = e.Event((n.idle ? "idle" : "active") + ".idleTimer");
				e(i).trigger(a, [i, e.extend({}, n), t])
			},
			l = function(t) {
				var n = e.data(i, "idleTimerObj") || {};
				if(null == n.remaining) {
					if("mousemove" === t.type) {
						if(t.pageX === n.pageX && t.pageY === n.pageY) return;
						if("undefined" == typeof t.pageX && "undefined" == typeof t.pageY) return;
						var a = +new Date - n.olddate;
						if(200 > a) return
					}
					clearTimeout(n.tId), n.idle && o(t), n.lastActive = +new Date, n.pageX = t.pageX, n.pageY = t.pageY, n.tId = setTimeout(o, n.timeout)
				}
			},
			u = function() {
				var t = e.data(i, "idleTimerObj") || {};
				t.idle = t.idleBackup, t.olddate = +new Date, t.lastActive = t.olddate, t.remaining = null, clearTimeout(t.tId), t.idle || (t.tId = setTimeout(o, t.timeout))
			},
			d = function() {
				var t = e.data(i, "idleTimerObj") || {};
				null == t.remaining && (t.remaining = t.timeout - (+new Date - t.olddate), clearTimeout(t.tId))
			},
			c = function() {
				var t = e.data(i, "idleTimerObj") || {};
				null != t.remaining && (t.idle || (t.tId = setTimeout(o, t.remaining)), t.remaining = null)
			},
			m = function() {
				var t = e.data(i, "idleTimerObj") || {};
				clearTimeout(t.tId), s.removeData("idleTimerObj"), s.off("._idleTimer")
			},
			f = function() {
				var t = e.data(i, "idleTimerObj") || {};
				if(t.idle) return 0;
				if(null != t.remaining) return t.remaining;
				var n = t.timeout - (+new Date - t.lastActive);
				return 0 > n && (n = 0), n
			};
		if(null === t && "undefined" != typeof r.idle) return u(), s;
		if(null === t);
		else {
			if(null !== t && "undefined" == typeof r.idle) return !1;
			if("destroy" === t) return m(), s;
			if("pause" === t) return d(), s;
			if("resume" === t) return c(), s;
			if("reset" === t) return u(), s;
			if("getRemainingTime" === t) return f();
			if("getElapsedTime" === t) return +new Date - r.olddate;
			if("getLastActiveTime" === t) return r.lastActive;
			if("isIdle" === t) return r.idle
		}
		return "undefined" != typeof a.hidden ? a.visibilitychange(function() {
			o()
		}) : (s.on(e.trim((n.events + " ").split(" ").join("._idleTimer ")), function(e) {
			l(e)
		}), r.idle || (r.tId = setTimeout(o, r.timeout))), r = e.extend({}, {
			olddate: +new Date,
			lastActive: +new Date,
			idle: n.idle,
			idleBackup: n.idle,
			timeout: n.timeout,
			remaining: null,
			tId: null,
			pageX: null,
			pageY: null
		}), e.data(i, "idleTimerObj", r), s
	}, e.fn.idleTimer = function(t) {
		return this[0] ? e.idleTimer(t, this[0]) : this
	}
}(jQuery), _.Module.define({
	path: "encourage-base/widget/global_notice/barrage",
	requires: [],
	sub: {
		isInit: !1,
		initial: function() {
			if(!this.isInit) {
				window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function(e) {
					return setTimeout(e, 1e3 / 60)
				}, window.cancelAnimationFrame = window.cancelAnimationFrame || window.clearTimeout, this.isInit = !0;
				var e = function() {
					function e(e, t) {
						e && (h = $.extend(h, t), c = e, p = 0 == c.width(), c.html(""), m = [], f = [], g = 0)
					}

					function t() {
						for(var e = 0; e < h.rowCount; e++) {
							var t = new u;
							f.push(t), c.append(t.$row)
						}
					}

					function i() {
						f = [], c.html("")
					}

					function n(e) {
						m.push(e), d || l()
					}

					function a() {
						_ = !0
					}

					function s() {
						_ = !1, d || l()
					}

					function r() {
						if(c.width() >= h.containerWidth) p = !1, t();
						else {
							var e = c.width(),
								i = parseFloat(c.css("marginLeft"));
							e += h.unfoldSpeed || h.speed, i -= h.unfoldSpeed || h.speed, c.css({
								width: e,
								marginLeft: i
							})
						}
					}

					function o() {
						p = !0, i(), c.fadeOut("normal", function() {
							var e = parseFloat(c.css("marginLeft")) + c.width();
							c.css({
								display: "block",
								width: 0,
								marginLeft: e
							})
						})
					}

					function l() {
						if(_) return cancelAnimationFrame(d), d = null, void 0;
						var e = m.length;
						if(!g && !e) {
							if(p) return cancelAnimationFrame(d), d = null, void 0;
							o()
						}
						if((g || e) && p) r();
						else {
							if(g <= h.scrollElementMaxLength && e) {
								var t = m.shift(),
									i = Math.round(Math.random() * (h.rowCount - 1));
								f[i].add(t), g += 1
							}
							$.each(f, function(e, t) {
								t.scroll()
							})
						}
						d = requestAnimationFrame(l)
					}

					function u() {
						this.$row = $("<div></div>"), this.scrollElementArr = [], this.containerWidth = c.width(), this.marginLeft = this.width = this.containerWidth, this.$row.css({
							"margin-left": this.marginLeft,
							height: h.rowHeight,
							width: this.width,
							position: "relative"
						})
					}
					var d, c, m = [],
						f = [],
						g = 0,
						p = !0,
						_ = !1,
						h = {
							speed: 5,
							rowCount: 1,
							rowHeight: 20,
							scrollElementMaxLength: 30,
							elementMarginLeft: 20,
							containerWidth: 988,
							containerMarginLeft: -498
						};
					return u.prototype = {
						add: function(e) {
							var t = this.scrollElementArr[this.scrollElementArr.length - 1],
								i = h.elementMarginLeft,
								n = this.containerWidth - this.marginLeft + i;
							if(t) {
								var a = t.position(),
									s = t.outerWidth(!0),
									r = this.containerWidth - a.left - s - this.marginLeft;
								n = r > i ? r : i
							}
							e.css({
								display: "inline-block",
								"margin-left": n
							}), this.$row.append(e), this.width += e.outerWidth(!0), this.$row.css({
								width: this.width
							}), this.scrollElementArr.push(e)
						},
						shift: function() {
							if(this.scrollElementArr.length) {
								var e = this.scrollElementArr.shift(),
									t = e.outerWidth(!0);
								e.remove(), e = null, g -= 1, this.scrollElementArr.length ? (this.width -= t, this.marginLeft += t) : (this.width = this.containerWidth, this.marginLeft = 0), this.$row.css({
									width: this.width,
									"margin-left": this.marginLeft
								})
							}
						},
						scroll: function() {
							this.scrollElementArr.length && (this.checkElementScrollEdge(), this.marginLeft -= h.speed, this.$row.css({
								"margin-left": this.marginLeft
							}))
						},
						checkElementScrollEdge: function() {
							if(this.marginLeft < 0) {
								var e = this.scrollElementArr[0],
									t = e.outerWidth(!0);
								t + this.marginLeft <= 0 && this.shift()
							}
						}
					}, {
						init: e,
						addMessage: n,
						pause: a,
						resume: s
					}
				}();
				$.extend(this, e)
			}
		}
	}
}), _.Module.define({
	path: "encourage-base/widget/global_notice",
	requires: ["encourage-base/widget/global_notice/barrage", "encourage-appforum/widget/novel_icons"],
	sub: {
		intervalId: null,
		waitToRollList: [],
		showedFireworkMap: {},
		pkgIds: [],
		viewTotalNum: 0,
		isFireworkV2: 0,
		fireworkList: [],
		locationType: "frs" === PageData.page ? 0 : 1,
		locationId: PageData.forum.id,
		messageTplMap: {
			1e4: ['<div class="global_notice_unit">', '<a  href="#{href}" target="_blank">', '#{user_name}\u6b63\u5728<span class="forum_name">[#{forum_name}\u5427]</span>\u653e#{item}\uff0c', '  \u6389\u843d<span class="tdou_num">#{scores}</span><i class="global_message_tdou_icon"></i>', '<span class="get_firework_icon"></span></a>', "</div>"].join(""),
			10001: ['<div class="global_notice_unit">', '<a  href="#{href}" target="_blank">', '#{user_name}\u5728<span class="forum_name">[#{forum_name}\u5427]</span>', '\u6361\u5230<span class="tdou_num">#{scores}</span><i class="global_message_tdou_icon"></i>', "</a>", "</div>"].join(""),
			10002: ['<div class="global_notice_unit">', '<a  href="/f?kw=t%E8%B1%86%E5%A8%B1%E4%B9%90%E5%9F%8E&ie=utf-8" target="_blank">', '#{user_name}\u5728<span class="forum_name">[#{game_name}]</span>\u6e38\u620f\u4e2d\u5927\u80dc\uff0c', '\u8d62\u53d6\u4e86<span class="tdou_num">#{scores}</span><i class="global_message_tdou_icon"></i>', "</a>", "</div>"].join(""),
			10003: ['<div class="global_notice_unit">', '<a  href="/f?kw=#{forum_name}&ie=utf-8" target="_blank">', '#{user_name}\u5728<span class="forum_name">[#{forum_name}\u5427]</span>', '\u53d1\u5e03<span class="tdou_num">#{scores}</span><i class="global_message_tdou_icon"></i>', "\u7684\u3010#{bonus_name}\u3011\u7ea2\u5305#{bonus_num}\u4e2a", "</a>", "</div>"].join(""),
			10004: ['<div class="global_notice_unit">', '<a  href="http://spread.xiu8.com/spreed!baiduGo.jspa?pid=1072&sid=104&t=2&roomId=#{live_id}" target="_blank">', '<span class="forum_name">#{user_name}</span>\u699c\u4e0a\u6709\u540d\uff0c\u4e00\u63b7\u5343\u91d1\u5e7f\u53d1T\u8c46\u3001\u798f\u888b\uff01', '<span class="get_firework_icon"></span></a>', "</a>", "</div>"].join(""),
			10005: ['<div class="global_notice_unit">', '<a href="/f?kw=#{forum_name}&ie=utf-8" target="_blank">', '<span class="forum_name">[#{forum_name}\u5427]</span>', '\u53d1\u5e03<span class="tdou_num">#{bonus_num}</span>\u4e2a', "\u73b0\u91d1\u7ea2\u5305", "</a>", "</div>"].join(""),
			10006: ['<div class="global_notice_unit">', '<a href="/f?kw=#{forum_name}&ie=utf-8" target="_blank">', '\u4e07\u4eba\u819c\u62dc\uff0c\u606d\u559c <span class="forum_name">#{reader_name}</span> \u6210\u4e3a', ' <span class="forum_name">[#{forum_name}]</span> \u5427\u7b2c#{level_count}\u4f4d', '<i class="novel-level-icon global-novel-notice novel-level-#{fans_level}"></i>', "</a>", "</div>"].join(""),
			10007: ['<div class="global_notice_unit">', '<a href="/p/#{thread_id}?from_notice=1" target="_blank">', '\u4e07\u4eba\u819c\u62dc\uff0c<span class="forum_name">#{reader_name}</span>\u4e3a<span class="forum_name">[#{forum_name}\u5427]</span>\u6295\u7968#{month_ticket}\u5f20\uff0c', '<span class="forum_name">\u8d34\u5427\u798f\u5229\u9001\u9001\u9001\uff01</span><span class="get_firework_icon"></span>', "</a>", "</div>"].join(""),
			10008: ['<div class="global_notice_unit">', '<a  href="#{href}" target="_blank">', '#{user_name}\u6b63\u5728<span class="forum_name">[#{forum_name}\u5427]</span>\u653e#{item}\uff0c', '  \u6389\u843d<span class="tdou_num">#{scores}</span><i class="global_message_tdou_icon"></i>', '<span class="get_firework_icon"></span></a>', "</div>"].join("")
		},
		statusTplMap: ['<div id="firework_status" class="firework_status_wrap">', '<div class="user_info">', '<div class="photo">', '<img src="https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/#{portrait}" width="72" height="72" />', "</div>", '<div class="name_and_tdou">', '<p class="name">#{user_name}</p>', '<p class="tdou">', '<i class="icon_tdou"></i>', '<span class="j_user_scores">#{user_scores}</span>', '<a href="javascript:;" class="j_buy_tdou"> [\u83b7\u53d6]</a>', "</p>", "</div>", "</div>", '<div class="firework_info">', '<p>\u60a8\u4f4d\u4e8e#{item}\u8fbe\u4eba\u699c\u7b2c<span class="orange_text">#{rank}</span>\u4f4d</p>', "</div>", '<div class="firework_operate">', '<a href="javascript:;" class="btn_repeat j_btn_repeat"></a>', "</div>", '<a href="javascript:;" class="btn_close j_close"></a>', "</div>"].join(""),
		statusTplMapV2: ['<div id="firework_status" class="firework_status_wrap">', '<div class="user_info">', '<div class="photo">', '<img src="https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/#{portrait}" width="72" height="72" />', "</div>", '<div class="name_and_tdou">', '<p class="name">#{user_name}</p>', '<p class="tdou">', '<i class="icon_tdou"></i>', '<span class="j_user_scores">#{user_scores}</span>', '<a href="javascript:;" class="j_buy_tdou"> [\u83b7\u53d6]</a>', "</p>", "</div>", "</div>", '<div class="firework_info">', '<p>\u60a8\u4f4d\u4e8e#{item}\u8fbe\u4eba\u699c\u7b2c<span class="orange_text">#{rank}</span>\u4f4d</p>', "</div>", '<div class="firework_operate">', '<a href="javascript:;" class="btn_repeat j_btn_repeat"></a>', "</div>", '<a href="javascript:;" class="btn_close j_close"></a>', "</div>"].join(""),
		initial: function(e) {
			var t = this;
			e = $.extend({}, e);
			var i = e.fireworkOptionsConf;
			fireworkOptionsConfArr = i.split("|"), this.fireworkOptions = {
				width: fireworkOptionsConfArr[0],
				height: fireworkOptionsConfArr[1],
				item: fireworkOptionsConfArr[2]
			}, this.scores = e.scores, this.level = e.level, this.isFireworkV2 = e.isFireworkV2, this.$notice = $("#global_notice_wrap"), this.barrage = this.requireInstance("encourage-base/widget/global_notice/barrage"), this.barrage.init(this.$notice, {
				speed: 2,
				foldSpeed: 15,
				unfoldSpeed: 10,
				rowCount: 1,
				rowHeight: 50,
				scrollElementMaxLength: 100,
				elementMarginLeft: 20,
				containerWidth: 980,
				containerMarginLeft: -490
			}), this.startPolling(), window.jsonpGlobalMessageHandler = function(e) {
				return function(t) {
					e.globalMessageHandler(t)
				}
			}(this), this.observe("fireworkv2.global_notice", function(e, i) {
				t.showFireworkStatusV2(i)
			}), this.observe("firework.global_notice", function(e, i) {
				var n = t.buildMessage(i);
				n && t.showMessageBar($(n)), t.showFireworkStatus(i)
			}), this.$notice.on("click", function() {
				var e = $(this).data("type");
				$.stats.track("\u5168\u5c40\u516c\u544a\u533a\u57df\u70b9\u51fb\u91cf_" + e, "firework_activity")
			}), this.observe("firework.global_preview", function() {
				t.previewFireworkStatus()
			}), this.observe("firework.global_preview_close", function() {
				t.previewFireworkStatusClose()
			}), this.observe("firework.polling", function() {
				t.pollingAtOnce()
			})
		},
		startPolling: function() {
			var e = this;
			$(document).idleTimer(6e4), $(document).on("idle.idleTimer", function() {
				e.pausePolling()
			}), $(document).on("active.idleTimer", function() {
				e.polling()
			}), e.$notice.on("mouseenter", function() {
				e.barrage.pause()
			}).on("mouseleave", function() {
				e.barrage.resume()
			}), e.polling()
		},
		polling: function() {
//			this.intervalId && clearInterval(this.intervalId), this.intervalId = setInterval(function() {
//				$.getScript("//tbmsg.baidu.com/gmessage/get?mtype=1")
//			}, 1e4), $.getScript("//tbmsg.baidu.com/gmessage/get?mtype=1")
		},
		pollingAtOnce: function() {
//			this.intervalId && clearInterval(this.intervalId), this.intervalId = setInterval(function() {
//				$.getScript("//tbmsg.baidu.com/gmessage/get?mtype=1")
//			}, 1e4), $.getScript("//tbmsg.baidu.com/gmessage/get?mtype=1")
		},
		pausePolling: function() {
			this.intervalId && clearInterval(this.intervalId)
		},
		globalMessageHandler: function(e) {
			var t, i, n = $.tb.Storage.get("global_message_cid"),
				a = 0 || $.tb.Storage.get("global_message_update_time"),
				s = 0,
				r = this,
				o = [],
				l = 0;
			if(i = r.fireworkList.length, i > 0) {
				var u;
				for(u = [], t = 0; i > t; t++) 1e3 * r.fireworkList[t].msg_body.fire_start_time <= +new Date ? r.handleSingleMessage(r.fireworkList[t]) : u.push(r.fireworkList[t]);
				r.fireworkList = u
			}
			if($.isArray(e)) {
				for(t = 0, i = e.length; i > t; t++)
					if(10008 !== e[t].msg_body.msg_type) e[t].msg_id = +e[t].msg_id, n < e[t].msg_id && (s = s > e[t].msg_id ? s : e[t].msg_id, r.handleSingleMessage(e[t]));
					else {
						if(!r.isFireworkV2) continue;
						e[t].msg_body.fire_update_time > a && (1 !== e[t].not_set_fire && e[t].msg_body.location_id === r.locationId && e[t].msg_body.location_type === r.locationType && o.push(e[t]), 1e3 * e[t].msg_body.fire_start_time > +new Date ? r.fireworkList.push(e[t]) : r.handleSingleMessage(e[t]), l = a > e[t].msg_body.fire_update_time ? a : e[t].msg_body.fire_update_time)
					}
				s > n && $.tb.Storage.set("global_message_cid", s, +new Date + 31536e6)
			}
			0 !== o.length && r.fire("firework.add_firework", JSON.stringify(o)), l && $.tb.Storage.set("global_message_update_time", l, +new Date + 6e5)
		},
		handleSingleMessage: function(e) {
			var t, i = +new Date,
				n = e.end_time || e.msg_body.fire_end_time;
			1e3 * n > i && (t = this.buildMessage(e.msg_body), t && this.showMessageBar(t))
		},
		buildMessage: function(e) {
			function t(e) {
				var t = "";
				return t = "undefined" == typeof e.location_type ? "javascript:void(0);" : 0 == e.location_type ? "/f?kw=" + encodeURIComponent(e.forum_name) : "/p/" + e.location_id
			}

			function i(e) {
				if(e > 9999) {
					var t = e % 1e4 !== 0 ? (e / 1e4).toFixed(1) : e / 1e4;
					return t + "\u4e07"
				}
				return e
			}
			var n = +new Date,
				a = this.messageTplMap[e.msg_type];
			if(e.scores = i(e.scores), a) {
				if(e.end_time && 1e3 * e.end_time < n) return;
				if(1e4 == e.msg_type) {
					if(self.showedFireworkMap[e.package_id]) return;
					self.showedFireworkMap[e.package_id] = 1, this.fire("play.firework", e)
				} else if(10001 == e.msg_type) this.fire("get.firework", e);
				else if(10002 == e.msg_type && 1 != PageUnit.load("global_notice_game_switch")) return;
				return this.$notice.data("type", e.msg_type), $($.tb.format(a, $.extend(e, {
					href: t(e)
				}, this.fireworkOptions)))
			}
		},
		showMessageBar: function(e) {
			this.barrage.addMessage(e)
		},
		previewFireworkStatus: function() {
			var e = $("#firework_status"),
				t = this;
			if(0 == e.length) {
				var i = $.tb.format(this.statusTplMap, $.extend({
					portrait: PageData.user.portrait,
					user_name: PageData.user.name,
					user_scores: t.scores.scores_total || 0,
					rank: 1,
					item: "\u70df\u82b1"
				}, this.fireworkOptions));
				e = $(i).insertAfter(this.$notice)
			}
			e.find(".j_view_num").text(9321332), e.find(".j_user_num").text(2321301), e.animate({
				bottom: 0
			});
			var n = {
					forum_name: PageData.forum.name,
					location_id: this.locationId,
					location_type: this.locationType,
					scores: "5\u4e07",
					user_name: PageData.user.name,
					portrait: PageData.user.portrait,
					msg_type: 1e4,
					item: "\u70df\u82b1"
				},
				a = this.messageTplMap[n.msg_type];
			this.showMessageBar($($.tb.format(a, $.extend(n, this.fireworkOptions))))
		},
		previewFireworkStatusClose: function() {
			var e = $("#firework_status");
			e.length > 0 && e.remove()
		},
		showFireworkStatus: function(e) {
			this.pkgIds.push(e.package_id);
			var t = this,
				i = $("#firework_status");
			if(0 == i.length) {
				var n = $.tb.format(this.statusTplMap, $.extend(e, this.fireworkOptions));
				i = $(n).insertAfter(this.$notice), i.find(".j_close").on("click", function() {
					i.animate({
						height: 0
					}, 300, function() {
						i.remove(), t.pkgIds.length = 0
					})
				}), i.find(".j_btn_repeat").on("click", function() {
					t.fire("buy.firework")
				}), i.find(".j_buy_tdou").on("click", function() {
					t.requireInstance("encourage-payment/widget/tcharge_dialog")
				})
			} else i.find(".j_user_scores").text(e.user_scores);
			i.animate({
				bottom: 0
			}), this.increaseViewNum(i.find(".j_view_num"), this.viewTotalNum, this.viewTotalNum += e.view), this.pollingVisitNum(i.find(".j_user_num"), this.pkgIds.length)
		},
		showFireworkStatusV2: function(e) {
			var t = this,
				i = $("#firework_status");
			if(0 == i.length) {
				var n = $.tb.format(this.statusTplMapV2, $.extend(e, this.fireworkOptions));
				i = $(n).insertAfter(this.$notice), i.find(".j_close").on("click", function() {
					i.animate({
						height: 0
					}, 300, function() {
						i.remove(), t.pkgIds.length = 0
					})
				}), i.find(".j_btn_repeat").on("click", function() {
					t.fire("buy.firework")
				}), i.find(".j_buy_tdou").on("click", function() {
					t.requireInstance("encourage-payment/widget/tcharge_dialog")
				})
			} else i.find(".j_user_scores").text(e.user_scores);
			i.animate({
				bottom: 0
			})
		},
		pollingVisitNum: function(e, t) {
			var i = this,
				n = 0,
				a = function() {
					n > 30 || i.pkgIds.length > t || setTimeout(function() {
						$.post("/tbmall/submit/giftpkg/getView", {
							pids: i.pkgIds.toString()
						}, function(t) {
							0 == t.no && e.text(t.data.uv)
						}), n++, a()
					}, 1e3)
				};
			a()
		},
		increaseViewNum: function(e, t, i) {
			var n = this,
				a = function(t, a) {
					var s = n.easeOutQuint(t, a, i, 3e4);
					e.text(parseInt(s, 10))
				},
				s = 0,
				r = function() {
					s > 30 || n.viewTotalNum > i || setTimeout(function() {
						s++, a(1e3 * s, t), r()
					}, 1e3)
				};
			r()
		},
		easeOutQuint: function(e, t, i, n) {
			return e /= n, e--, i * (e * e * e * e * e + 1) + t
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/umoney_promotion_dialog",
	sub: {
		storageKey: "Umoney_Promotion",
		$wrap: null,
		initial: function(o) {
			var n = this;
			o = o || {}, n.option = o, n.showCount = o.showCount || "1", n.userId = o.userId || $.getPageData("user.id", ""), n.promotionUrl = o.promotionUrl || "/f?ie=utf-8&kw=\u767e\u5ea6\u6709\u94b1\u6d88\u8d39\u91d1\u878d", "" !== n.userId && (n.key = this.storageKey + "_" + this.userId, n.isOpened() || (n.showDialog(), n.bindEvents(), n.setOpened()))
		},
		showDialog: function() {
			var o = this,
				n = '<div class="umoney-dialog">\r\n    <a class="close-bg"><span class="close-btn"></span></a>\r\n\r\n</div>',
				t = "umoney-promotion-dialog";
			if(!($("." + t).length > 0)) {
				var e = {
						modal: !0,
						showTitle: !1,
						fixed: !0,
						width: 485,
						height: 358,
						holderClassName: t,
						draggable: !0,
						html: n
					},
					i = $.dialog;
				o._dialog = new i(e), o._dialog.show(), o.$wrap = o._dialog.element, o.$wrap.find(".umoney-dialog").css("background", "url(" + o.option.backgroundImageUrl + ") no-repeat"), o.track("show")
			}
		},
		bindEvents: function() {
			var o = this;
			this.$wrap.on("click", ".umoney-dialog", function(n) {
				o.stopEvent(n), window.open(o.promotionUrl), o.track("open-umoney"), o.closeDialog()
			}).on("click", ".close-btn", function(n) {
				o.stopEvent(n), o.closeDialog()
			})
		},
		closeDialog: function() {
			var o = this;
			o._dialog && o._dialog.close(), o.track("close")
		},
		isOpened: function() {
			var o = this,
				n = $.tb.Storage.get(o.key);
			return n === o.showCount || "" === n
		},
		setOpened: function() {
			var o = this;
			$.tb.Storage.set(o.key, o.showCount)
		},
		stopEvent: function(o) {
			o.preventDefault(), o.stopPropagation()
		},
		track: function(o, n) {
			$.stats.track(o, "umoney-promotion", n || "", "click")
		}
	}
});
_.Module.define({
	path: "encourage-props/widget/dialog",
	sub: {
		initial: function() {},
		dialog: function(t) {
			var n = this;
			n.customDialog = new $.dialog({
				html: '<div class="dialog_ctn_wrapper"> ' + t + "</div>",
				title: "\u63d0\u793a",
				width: 430
			}), n.customDialog.bind("onclose", function() {
				n.trigger("onInfoClose")
			}), $(".charge_bean_interaction_j_charge_btn").click(function() {
				n.customDialog.close()
			}), $(".charge_bean_interaction_j_close_dialog").click(function(t) {
				t.preventDefault(), n.customDialog.close()
			})
		},
		info: function(t, n) {
			var i = this;
			n = n || {};
			var o = n.button || "\u786e \u5b9a";
			i.infoDialog = new $.dialog({
				html: '<div class="dialog_ctn_wrapper"> ' + t + '<div class="confirm_wrapper theme_info"><a class="btn-default btn-middle ui_btn ui_btn_m yes"><span><em>' + o + "</em></span></a></div></div>",
				title: n.title || "\u63d0\u793a",
				width: n.width || 430
			}), i.infoDialog.element.one("click", ".yes", function(t) {
				t.preventDefault(), i.infoDialog.close(), i.trigger("onInfoYes")
			}), i.infoDialog.bind("onclose", function() {
				i.trigger("onInfoClose")
			})
		},
		confirm: function(t, n) {
			var i = this,
				o = {
					button: [{
						txt: "\u786e \u5b9a",
						extraclass: ""
					}, {
						txt: "\u53d6 \u6d88"
					}]
				};
			n = $.extend(o, n);
			var e = '<a class="btn-default btn-middle ui_btn ui_btn_m yes ' + n.button[0].extraclass + '"><span><em>' + n.button[0].txt + '</em></span></a><a class="btn-default btn-middle ui_btn ui_btn_sub_m no"><span><em>' + n.button[1].txt + "</em></span></a>";
			i.confirmDialog = new $.dialog({
				html: '<div class="dialog_ctn_wrapper"> ' + t + '<div class="confirm_wrapper">' + e + "</div></div>",
				title: "\u63d0\u793a",
				width: n.width || 430
			}), $(i.confirmDialog.getElement()).one("click", ".yes", function(t) {
				t.preventDefault(), "function" == typeof n.button[0].callback ? n.button[0].callback() : i.trigger("yes")
			}).one("click", ".no", function(t) {
				t.preventDefault(), "function" == typeof n.button[1].callback ? n.button[1].callback() : i.trigger("no")
			})
		},
		getConfirmDialog: function() {
			return this.confirmDialog
		},
		enableYesBtn: function() {
			this.confirmDialog.element.find(".yes").data("clicked", !1)
		},
		close: function() {
			this.confirmDialog && this.confirmDialog.close()
		}
	}
});
_.Module.define({
	path: "encourage-props/widget/util",
	sub: {
		_propCategoryMap: {
			101: "\u53d1\u8d34\u6c14\u6ce1",
			102: "",
			103: "\u4e2a\u6027\u6c34\u5370",
			104: "\u70ab\u5f69\u5b57\u4f53",
			105: "",
			106: "",
			107: "\u9b54\u6cd5\u5f39",
			108: "\u8865\u7b7e\u795e\u5668",
			109: "\u52a8\u6001\u5934\u50cf",
			110: "\u5934\u50cf\u8fb9\u6846",
			111: "",
			112: "\u4e2a\u6027\u94ed\u724c",
			113: "\u540d\u7247\u80cc\u666f",
			114: "\u94ed\u724c\u91cd\u94f8\u5361",
			115: "",
			116: "\u8d34\u6761\u5361",
			117: "\u633d\u5c0a\u5361"
		},
		_freeUseMap: {
			1070001: 12,
			1070002: 12,
			1080001: 8
		},
		_badgeMap: {
			1: "\u8d34\u5427\u4f1a\u5458",
			2: "\u8d34\u5427\u8d85\u7ea7\u4f1a\u5458"
		},
		initial: function(e) {
			this.opts = e || {}
		},
		badgeNameMap: function(e) {
			var a = parseInt(e);
			return a > 105e4 && (a -= 105e4), this._badgeMap[a]
		},
		getFreeUseCount: function(e) {
			return this._freeUseMap[e]
		},
		getMaxLevel: function(e) {
			var a = 0,
				t = +new Date,
				n = e || this.opts.userProp || {};
			if(!n || !n.level) return 0;
			var r = n.level;
			return 1e3 * r.end_time > t && parseInt(r.props_id, 10) > a && (a = parseInt(r.props_id, 10)), a
		},
		convertNumber: function(e) {
			return e > 99999999 ? Math.round(e / 1e8, 2) + "\u4ebf" : e > 99999 ? Math.round(e / 1e4, 2) + "\u4e07" : e
		},
		formatDate: function(e) {
			function a(e) {
				return e > 9 ? e : "0" + e.toString()
			}
			var t = new Date(1e3 * e);
			return t.getFullYear() + "\u5e74" + (t.getMonth() + 1) + "\u6708" + t.getDate() + "\u65e5 " + a(t.getHours()) + ":" + a(t.getMinutes())
		},
		hasOwnProp: function(e, a) {
			return PageData.props[e] && PageData.props[e][a] && 1e3 * PageData.props[e][a].end_time > Env.server_time
		},
		convertToDay: function(e) {
			return Math.ceil(e / 86400) + "\u5929"
		},
		getCategoryName: function(e) {
			return this._propCategoryMap[e]
		},
		getFreeInfo: function(e) {
			var a = this,
				t = '<div class="free_info">';
			return "1080002" == e.props_id ? (t += '<span  title="' + a.badgeNameMap(2) + '" >', t += '<a class="j_tbmall_join_vip_btn strong_txt level2"><span class="icon-crown-super-vip"></span>\u4e00\u6b21\u5145\u503c12\u4e2a\u6708\uff0c</a>\u9001\u4e09\u5f20</span>') : 1 == e.props_type && a.getFreeUseCount(e.props_id) ? (t += '<span  title="' + a.badgeNameMap(2) + '" >', t += '<a class="j_tbmall_join_vip_btn strong_txt level2"><span class="icon-crown-super-vip"></span>\u5f00\u901a\u8d85\u7ea7\u4f1a\u5458</a>\u514d\u8d39\u4f7f\u7528', t += '<span class="free_use_count">' + a.getFreeUseCount(e.props_id) + "</span>\u4e2a</span>") : 1 != e.props_type && (t += '<span  title="' + a.badgeNameMap(e.free_user_level) + '" >', t += '<a class="j_tbmall_join_vip_btn strong_txt level' + e.free_user_level + '"><span class="icon-crown-super-vip"></span>\u5f00\u901a' + (2 == e.free_user_level ? "\u8d85\u7ea7" : "") + "\u4f1a\u5458</a>\u514d\u8d39\u4f7f\u7528</span>"), t += "</div>"
		},
		hasUsedProp: function(e, a) {
			return PageData.props[e] && !!PageData.props[e][a] && !!parseInt(PageData.props[e][a].open_status, 10)
		},
		hasBadge: function() {
			return PageData.props.level && PageData.props.level.prop_id && 1e3 * PageData.props.level.end_time > Env.server_time
		},
		shouldHaveProp: function(e) {
			return e > 0 && this.hasBadge() && PageData.props.level.prop_id >= e
		},
		getBuyInfo: function(e) {
			var a, t, n = this,
				r = "",
				s = e.props_category,
				p = e.props_id,
				o = e.free_user_level,
				i = n.hasOwnProp(s, p),
				u = n.hasUsedProp(s, p),
				_ = n.shouldHaveProp(o);
			return i ? "1" === e.is_default_used && (u ? (t = "\u53d6\u6d88\u4f7f\u7528", a = "j_cancle_use") : (t = "\u4f7f\u7528", a = "j_use"), r += ['<a href="#" class="ui_btn ui_btn_sub_s ' + a + '">', "<span><em>" + t + "</em></span>", "</a>"].join("")) : (_ ? (a = "j_get_button1", t = "\u9886\u53d6") : (a = "j_buy_button1", t = "\u5151&nbsp;&nbsp;\u6362"), r += ['<a class="ui_btn ui_btn_sub_s ' + a + '">', "<span><em>" + t + "</em></span>", "</a>"].join("")), r
		}
	}
});
_.Module.define({
	path: "encourage-props/widget/cont_sign_card",
	requires: ["encourage-props/widget/util", "encourage-props/widget/dialog", "encourage-member/widget/join_vip_dialog"],
	sub: {
		_card_count: 0,
		_tpl: '<div class="header">\u70b9\u51fb\u6211\u5173\u6ce8\u7684\u5427\u4f7f\u7528\u8fde\u7eed\u7b7e\u5230\u5361\uff08<span class="condition">\u6ce8\uff1a\u4f7f\u7528\u6761\u4ef6\u4e3a\u7d2f\u8ba1\u7b7e\u5230\u5929\u6570\u2265100\u5929\uff0c\u4ec5\u4f1a\u5458\u53ef\u4ee5\u4f7f\u7528</span>\uff09\uff1a</div><div id="j_signable_list" class="signable_list"><img class="loading" src="//tb1.bdstatic.com/tb/static-tbmall/img/loading.gif"></div><div class="bottom_info"><div class="my_cont_card">\u6211\u6709<span class="j_card_count orange_txt">0</span>\u5f20<span class="orange_txt">\u8fde\u7eed\u7b7e\u5230\u5361</span></div><p class="">\u8fde\u7eed\u7b7e\u5230\u5361\u5c06\u628a\u9009\u4e2d\u5427\u6240\u6709\u7684\u7b7e\u5230\u5929\u6570\u8fde\u7eed\u5728\u4e00\u8d77\uff01</p> </div> <div class="free_info"><span title="\u8d85\u7ea7\u8d34\u5427\u4f1a\u5458"><a class="j_tbmall_join_vip_btn strong_txt level2"><span class="icon"></span>\u4e00\u6b21\u5145\u503c12\u4e2a\u6708\uff0c</a>\u9001\u4e09\u5f20</span> </div>',
		initial: function(e) {
			return e || (e = {}), this.util = this.requireInstance("encourage-props/widget/util", [e]), this.mdialog = this.requireInstance("encourage-props/widget/dialog"), this.vip = this.requireInstance("encourage-member/widget/join_vip_dialog"), this.pageData = window.PageData, this.pageData.user.is_login ? (this.build(), this.loadSignableList(), this.bindEvent(), void 0) : (this.requireInstance("tbui/widget/LoginDialog"), void 0)
		},
		showMemberOnly: function() {
			var e = this,
				t = ['<div id="sign_tip_forNoMember" class="sign_tip_forNoMember">', "<p><span>\u8fde\u7eed\u7b7e\u5230\u5361</span>\u662f\u4f1a\u5458\u4e13\u5c5e\u9053\u5177,\u6210\u4e3a\u4f1a\u5458\u5373\u53ef\u4f7f\u7528!</p>", '<a class="ui_btn ui_btn_m j_openMember" href="#"><span><em>\u9a6c\u4e0a\u5f00\u901a</em></span></a>', '<p><a class="j_tbmall_join_vip_btn level2_icon" href="#">\u5145\u6ee112\u4e2a\u6708\u8d85\u7ea7\u4f1a\u5458</a>\u9001\u4e09\u5f20</p>', "</div>"].join(""),
				i = new $.dialog({
					html: t,
					title: "\u63d0\u793a",
					width: 430,
					height: 100
				});
			$("#sign_tip_forNoMember").delegate(".j_openMember", "click", function(t) {
				t.preventDefault(), i.close(), e.vip.getMemberDialog()
			}), $("#sign_tip_forNoMember").delegate(".j_tbmall_join_vip_btn", "click", function(t) {
				t.preventDefault(), i.close(), e.vip.getMemberDialog()
			})
		},
		build: function() {
			var e = this;
			this._dialog = new $.dialog({
				title: "\u4f7f\u7528\u8fde\u7eed\u7b7e\u5230\u5361",
				html: e._tpl,
				width: 662,
				holderClassName: "cont_sign_dialog",
				fixed: !1
			}), this._listdom = this._dialog.element.find("#j_signable_list")
		},
		loadSignableList: function() {
			var e = this,
				t = "";
			$.tb.get("/tbmall/get/getContSignableList", function(i) {
				if(i && 0 == i.no) {
					var a = i.data.list;
					if(a.length) {
						for(var n = 0, s = a.length; s > n; n++) t += '<a href="/f?kw=' + encodeURIComponent(a[n].forum_name) + '&ie=utf-8" target="_blank" data-fid="' + a[n].forum_id + '" class="signable_ba j_signable_ba">' + $.tb.subByte(a[n].forum_name, 11) + '<span class="forum_level lv' + a[n].level_id + '"></span></a> ';
						e._listdom.html(""), _.Module.use("tbui/widget/ScrollPanel", [{
							content: t,
							container: e._listdom,
							height: 210
						}])
					} else t = '<div class="no_signable_tip gray_txt">\u6ca1\u6709\u68c0\u6d4b\u5230\u4f60\u6709\u7d2f\u8ba1\u7b7e\u5230\u2265100\u5929\uff0c\u6216\u8005\u65ad\u7b7e\u7684\u5427\uff0c\u8bf7\u6838\u5b9e\u540e\u5237\u65b0\u9875\u9762\u3002</div>', e._dialog.element.find("#j_signable_list").height(280).html(t);
					e._card_count = i.data.card_count, e._dialog.element.find(".j_card_count").text(i.data.card_count)
				} else t = "\u54ce\u5440\uff0c\u670d\u52a1\u5668\u62bd\u98ce\u4e86\uff0c\u8bf7\u5173\u95ed\u7a97\u53e3\u91cd\u65b0\u52a0\u8f7d", e._dialog.element.find("#j_signable_list").html(t)
			})
		},
		bindEvent: function() {
			var e = this;
			this._dialog.element.on("click", ".j_signable_ba", function(t) {
				return e.util.getMaxLevel() ? ($(this).hasClass("signed") || (t.preventDefault(), e.showBubble($(this))), void 0) : (t.preventDefault(), e._dialog.close(), e.showMemberOnly(), void 0)
			}), this._dialog.bind("onclose", function() {
				e._bubble && e._bubble.closeBubble()
			})
		},
		showBubble: function(e) {
			var t = this;
			if(!t._isAjaxing) {
				var i = e.data("fid"),
					a = e.offset(),
					n = {
						arrow_dir: "up",
						bubble_css: {
							top: a.top + 37,
							left: a.left - 39,
							width: 172,
							height: 69,
							zIndex: 6e4
						},
						arrow_pos: {
							left: 87
						},
						wrap: $("body"),
						closeBtn: !0
					},
					s = '<div class="card_bubble_content"><span>\u6ca1\u6709<span class="blue_txt">\u8fde\u7eed\u7b7e\u5230\u5361</span></span><div><a href="/tbmall/propslist?category=108" target="_blank" class="ui_btn ui_btn_sub_s j_buy_card"><span><em>\u7acb\u5373\u8d2d\u4e70</em></span></a> </div></div>',
					l = '<div class="card_bubble_content"><span>\u9700\u8981\u6d88\u8017<span class="blue_txt">1\u5f20\u8fde\u7eed\u7b7e\u5230\u5361</span></span><div><a class="ui_btn ui_btn_sub_s j_use_card"><span><em>\u786e \u5b9a</em></span></a> </div></div>',
					o = '<div class="card_bubble_content"><span class="blue_txt">\u5df2\u7ecf\u6210\u529f\u4f7f\u7528\u8fde\u7eed\u7b7e\u5230\u5361,\u70b9\u51fb\u5427\u540d\u67e5\u770b</span></div>',
					_ = '<div class="card_bubble_content"><span>\u8fde\u7eed\u7b7e\u5230\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5~</span></div>';
				t._bubble && t._bubble.closeBubble(), n.content = t._card_count < 1 ? s : l, t._bubble = this.requireInstance("tbui/widget/bubble_tip", [n]), t._bubble.j_bubble.one("click", ".j_buy_card", function() {
					t._bubble.closeBubble()
				}).one("click", ".j_use_card", function(a) {
					a.preventDefault(), t._isAjaxing = !0, t._bubble.setContent('<div class="card_bubble_content"><img src="//tb1.bdstatic.com/tb/static-tbmall/img/loading.gif">\u6b63\u5728\u8fde\u7eed\u7b7e\u5230...</div>'), $.tb.post("/tbmall/post/useContSignCard", {
						forum_id: i,
						tbs: PageData.tbs
					}, function(i) {
						t._isAjaxing = !1, i && 0 == i.no ? (t._card_count--, t._card_count = Math.max(0, t._card_count), t._dialog.element.find(".j_card_count").text(t._card_count), t._bubble.setContent(o), e.addClass("signed")) : t._bubble.setContent(_)
					})
				}), t._bubble.showBubble()
			}
		}
	}
});
_.Module.define({
	path: "encourage-props/widget/net_proxy",
	requires: ["encourage-payment/widget/tbean_safe_ajax"],
	sub: {
		_buyPropUrl: "/tbmall/post/buyprops",
		_mBuyPropUrl: "/tbmall/post/mbuyprops",
		_usePropUrl: "/tbmall/post/openProps",
		_mUsePropUrl: "/tbmall/post/mopenProps",
		_cancelPropUrl: "/tbmall/post/closeProps",
		initial: function() {},
		buyProp: function(t, o) {
			var r = this;
			t.tbs = PageData.tbs;
			var s = this.requireInstance("encourage-payment/widget/tbean_safe_ajax");
			s.post(r._buyPropUrl, t, o)
		},
		mBuyProp: function(t, o) {
			var r = this;
			t.tbs = PageData.tbs, $.tb.post(r._mBuyPropUrl, t, o)
		},
		useProp: function(t, o) {
			var r = this;
			$.tb.post(r._usePropUrl, {
				props_id: t,
				tbs: PageData.tbs
			}, o)
		},
		mUseProp: function(t, o) {
			var r = this;
			t.tbs = PageData.tbs, $.tb.post(r._mUsePropUrl, t, o)
		},
		cancelProp: function(t, o) {
			var r = this;
			$.tb.post(r._cancelPropUrl, {
				props_id: t,
				tbs: PageData.tbs
			}, o)
		}
	}
});
_.Module.define({
	path: "encourage-props/widget/use_controller",
	requires: ["encourage-props/widget/NetProxy", "encourage-props/widget/Dialog", "encourage-props/widget/util"],
	sub: {
		buy_number: 0,
		initial: function() {
			this.netProxy = this.use("encourage-props/widget/NetProxy"), this.dialog = this.use("encourage-props/widget/Dialog"), this.util = this.use("encourage-props/widget/util")
		},
		doUse: function(e, a) {
			var i;
			$.isNumeric(e) ? i = e : (this.wrap = e, i = a.props_id);
			var o = this;
			$.stats.track(i, "\u8d34\u5427\u5546\u57ce", PageData.page, "\u70b9\u51fb\u4f7f\u7528"), o.netProxy.useProp(i, function(e) {
				var a = "";
				if(0 == e.no) a = "\u4f7f\u7528\u6210\u529f\uff01";
				else switch(e.no) {
					case 2270005:
						a = "\u54ce\u5440\uff0cT\u8c46\u4e0d\u8db3";
						break;
					case 2270001:
						a = "\u5df2\u7ecf\u4e70\u8fc7\u5566";
						break;
					case 2270004:
						a = "\u60a8\u5df2\u7ecf\u62e5\u6709\u4e86\u66f4\u9ad8\u7ea7\u7684\u52cb\u7ae0\uff0c\u65e0\u9700\u8d2d\u4e70\u672c\u52cb\u7ae0\uff01";
						break;
					case 2270006:
						a = "\u672c\u9053\u5177\u4e0d\u53ef\u91cd\u590d\u8d2d\u4e70";
						break;
					default:
						a = "\u54ce\u5440\uff0c\u670d\u52a1\u5668\u62bd\u98ce\u4e86\u3002\u8bf7\u7a0d\u7b49\u4e00\u4f1a~~"
				}
				o.wrap && o.wrap.data("clicked", !1), o.dialog.info('<div class="tip">' + a + "</div>"), 0 == e.no && o.dialog.bind("onInfoClose", function() {
					$.tb.location.reload()
				})
			})
		},
		cancelUse: function(e, a) {
			var i;
			$.isNumeric(e) ? i = e : (this.wrap = e, i = a.props_id);
			var o = this;
			$.stats.track(i, "\u8d34\u5427\u5546\u57ce", PageData.page, "\u53d6\u6d88\u4f7f\u7528"), o.netProxy.cancelProp(i, function(e) {
				var a = "";
				if(0 == e.no) a = "\u53d6\u6d88\u4f7f\u7528\u6210\u529f\uff01";
				else switch(e.no) {
					case 2270005:
						a = "\u54ce\u5440\uff0cT\u8c46\u4e0d\u8db3";
						break;
					case 2270001:
						a = "\u5df2\u7ecf\u4e70\u8fc7\u5566";
						break;
					case 2270004:
						a = "\u60a8\u5df2\u7ecf\u62e5\u6709\u4e86\u66f4\u9ad8\u7ea7\u7684\u52cb\u7ae0\uff0c\u65e0\u9700\u8d2d\u4e70\u672c\u52cb\u7ae0\uff01";
						break;
					case 2270006:
						a = "\u672c\u9053\u5177\u4e0d\u53ef\u91cd\u590d\u8d2d\u4e70";
						break;
					default:
						a = "\u54ce\u5440\uff0c\u670d\u52a1\u5668\u62bd\u98ce\u4e86\u3002\u8bf7\u7a0d\u7b49\u4e00\u4f1a~~"
				}
				o.wrap.data("clicked", !1), o.dialog.info('<div class="tip">' + a + "</div>"), 0 == e.no && o.dialog.bind("onInfoClose", function() {
					$.tb.location.reload()
				})
			})
		}
	}
});
_.Module.define({
	path: "encourage-props/widget/BuyController",
	requires: [],
	sub: {
		buy_number: 0,
		set_pass_tpl: '<div class="buy_tpl_set_pass"><p><a class="buy_tpl_setpass_link" href="/tbmall/pass/set" target="_blank">\u7acb\u5373\u8bbe\u7f6e\u652f\u4ed8\u5bc6\u7801</a>\uff0c\u964d\u4f4eT\u8c46\u88ab\u76d7\u98ce\u9669!</p></div>',
		buy_tpl0: '<div class="buy_tpl clearfix"> <div class="buy_tpl_left"><div class="prop_img"><img src="#{imgsrc}"></div><div class="title">#{title}</div><div class="price">#{price_unit}</div></div> <div class="buy_tpl_right"><div class="price_tip">\u60a8\u9700\u8981<span class="strong_txt">#{price}</span>T\u8c46\u5151\u6362\u9053\u5177</div> #{TbeanCharge}<a class="ui_btn ui_btn_sub_m j_confirm_buy j_buy_button"><span><em>\u786e\u8ba4\u5151\u6362</em></span></a><div class="buy_tpl_set_pass"><p><a class="buy_tpl_setpass_link" href="/tbmall/pass/set" target="_blank">\u7acb\u5373\u8bbe\u7f6e\u652f\u4ed8\u5bc6\u7801</a>\uff0c\u964d\u4f4eT\u8c46\u88ab\u76d7\u98ce\u9669!</p></div></div></div> ',
		buy_tpl1: ['<div class="buy_tpl buy_count_tpl clearfix">', ' <div class="buy_tpl_left"><div class="prop_img"><img src="#{imgsrc}"></div><div class="title">#{title}</div><div class="price">#{price_unit}</div>', '</div> <div class="buy_tpl_right">', '<p class="count_tip">\u60a8\u8981\u5151\u6362\u7684\u6570\u91cf</p>', '<div class="count_wrap clearfix"><span class="count_number">\u6570\u91cf\uff1a</span>', '<span class="counter"><button class="j_minus minus"></button><input type="text" class="j_count" value="1"/><button class="j_plus plus"></button></span><span>\u4e2a</span>', "</div>", '<div class="count_tip count_sub_tip">\u9700\u8981T\u8c46\uff1a<span class="t_dou_needed strong_txt">#{price}</span>\u4e2a  \u60a8\u76ee\u524dT\u8c46\uff1a<span class="cur_t_dou">#{cur_t_dou}</span>\u4e2a</div>', "#{TbeanCharge}", '<div class="buy_and_tip"><a class="btn-sub btn-middle ui_btn ui_btn_sub_m j_confirm_buy j_buy_button"><span><em>\u786e\u8ba4\u5151\u6362</em></span></a><span class="error_tip"></span></div>', '<div class="buy_tpl_set_pass"><p><a class="buy_tpl_setpass_link" href="/tbmall/pass/set" target="_blank">\u7acb\u5373\u8bbe\u7f6e\u652f\u4ed8\u5bc6\u7801</a>\uff0c\u964d\u4f4eT\u8c46\u88ab\u76d7\u98ce\u9669!</p></div>', " </div></div> "].join(""),
		initial: function(e, t) {
			this.data = t;
			$.stats.track(this.data.props_id, "\u8d34\u5427\u5546\u57ce", PageData.page, "\u70b9\u51fb\u5151\u6362"), this.netProxy = this.requireInstance("encourage-props/widget/NetProxy"), this.dialog = this.requireInstance("encourage-props/widget/Dialog"), this.util = this.requireInstance("encourage-props/widget/util"), this.useController = this.requireInstance("encourage-props/widget/UseController"), this.isAvailable() && this.doBuy(e), $(e).data("clicked", !1)
		},
		isAvailable: function() {
			var e = this.data,
				t = this,
				a = EncourageData.userScore,
				s = null != a.scores_money ? parseInt(a.scores_money) : 0,
				n = null != a.scores_other ? parseInt(a.scores_other) : 0,
				i = s + n,
				r = Math.min(parseInt(a.scores_fetch), parseInt(t.data.fetch_scores_limit || 0)),
				c = parseInt(i + r);
			return PageData.user.is_login ? PageData.user.no_un ? (TbCom.process("User", "BuildUnameFrame", "\u586b\u5199\u7528\u6237\u540d", "\u6709\u7528\u6237\u540d\u624d\u53ef\u4ee5\u5728T\u8c46\u5546\u57ce\u8d2d\u7269\u5662~"), !1) : c < parseInt(e.scores) ? (t.dialog.dialog("<p class='dialog_content'>T\u8c46\u4f59\u989d\u4e0d\u8db3\uff0c\u5151\u6362\u9053\u5177\u9700\u8981<span class='charge_bean_interaction_orange_tip' >" + e.scores + "</span>T\u8c46</p><div class='charge_bean_interaction_dialog_btn_wrap'><a class='charge_bean_interaction_charge_btns charge_bean_interaction_j_charge_btn' id='j_tcharge_dialog_tbmall'>\u83b7\u53d6T\u8c46</a><a class='charge_bean_interaction_charge_btns charge_bean_interaction_j_close_dialog'>\u53d6\u6d88</a></div>"), $("#j_tcharge_dialog_tbmall").on("click", function() {
				var a = {
					consumption_path: "12",
					desc: "\u5151\u6362\u9053\u5177",
					current_need_tdou: parseInt(e.scores, 10) - i,
					is_direct_cashier: !0,
					is_iframe: !0
				};
				t.requireInstance("encourage-payment/widget/tcharge_dialog", a)
			}), !1) : !0 : (TbCom.process("User", "buildLoginFrame"), !1)
		},
		bindCountEvent: function(e) {
			var t = this,
				a = t._buyDialog,
				s = a.element.find(".j_count");
			a.element.on("click", ".j_minus", function() {
				var a = parseInt(s.val()) || 1;
				a = Math.max(1, a - 1), a = Math.min(999, a), s.val(a), $(".t_dou_needed").text(e * a);
				var n = Math.min(EncourageData.userScore.scores_fetch, (t.data.fetch_scores_limit || 0) * a);
				$(".Tbean_num").text(n), t.checkCountError()
			}).on("click", ".j_plus", function() {
				var a = parseInt(s.val()) || 1;
				a++, a = Math.min(999, a), s.val(a), $(".t_dou_needed").text(e * a);
				var n = Math.min(EncourageData.userScore.scores_fetch, (t.data.fetch_scores_limit || 0) * a);
				$(".Tbean_num").text(n), t.checkCountError()
			}), s.on("input propertychange", function() {
				var a = /^[1-9]\d*$/,
					n = s.val();
				(n && !a.test(n) || a.test(n) && n > 999) && (n = n.replace(/\D/g, "").replace(/^0(\d*)$/, "$1"), n = Math.min(999, n), s.val(n)), $(".t_dou_needed").text(e * n), t.checkCountError()
			}).on("blur", function() {
				var a = s.val() && parseInt(s.val()) > 0 && parseInt(s.val()) || 1;
				a = Math.min(999, a), s.val(a), $(".t_dou_needed").text(e * a), t.checkCountError()
			}), a.element.on("click", ".j-get-tdou", function() {
				var e = {
					consumption_path: 120
				};
				a.close(), t.requireInstance("encourage-payment/widget/tcharge_dialog", e)
			})
		},
		checkCountError: function() {
			var e = this,
				t = e._buyDialog,
				a = t.element.find(".t_dou_needed"),
				s = t.element.find(".error_tip"),
				n = t.element.find(".j_count"),
				i = n.val(),
				r = t.element.find(".j_buy_button"),
				c = EncourageData.userScore,
				o = parseInt(c.scores_money + c.scores_other),
				_ = Math.min(parseInt(c.scores_fetch), parseInt(e.data.fetch_scores_limit || 0)),
				l = parseInt(o + _);
			return 999 == i ? (s.text("\u5355\u6b21\u9650\u5151999\u4e2a"), s.show()) : s.hide(), l < parseInt(a.text()) ? (s.text("T\u8c46\u4f59\u989d\u4e0d\u8db3").addClass("j-get-tdou"), s.show(), r.addClass("ui_btn_disable ui_btn_m_disable").removeClass("ui_btn ui_btn_sub_m j_confirm_buy"), !1) : (s.hide().removeClass("j-get-tdou"), r.addClass("ui_btn ui_btn_sub_m j_confirm_buy").removeClass("ui_btn_disable ui_btn_m_disable"), !0)
		},
		doBuy: function() {
			var e, t = this.data,
				a = this,
				s = "",
				n = "",
				i = parseInt(t.fetch_scores_limit, 10) || 0,
				r = EncourageData.userScore.scores_fetch;
			n = 0 === i || 0 === r ? "" : ['<div class="TbeanCharge_container">', '<input id="j_charge_checked" type="checkbox" name="TbeanCharge_check" />', '\u53ef\u4f7f\u7528<span class="icon_Tbean_num"></span><span class="Tbean_num">', Math.min(r, i), "</span>\u8c46\u7968\u62b5\u7528T\u8c46", "</div>"].join(""), "0" == t.props_type ? (EncourageData.userScore.setpass && (a.buy_tpl0 = a.buy_tpl0.replace("buy_tpl_set_pass", "buy_tpl_set_none")), s = $.tb.format(a.buy_tpl0, {
				price: t.scores,
				price_unit: t.scores + "T\u8c46/" + a.util.convertToDay(t.time_interval),
				title: t.name,
				imgsrc: t.imgsrc,
				level: t.free_user_level,
				TbeanCharge: n
			}), e = 480) : "1" == t.props_type && (EncourageData.userScore.setpass && (a.buy_tpl1 = a.buy_tpl1.replace("buy_tpl_set_pass", "buy_tpl_set_none")), s = $.tb.format(a.buy_tpl1, {
				price: t.scores,
				price_unit: t.scores + "T\u8c46/1\u4e2a",
				title: t.name,
				imgsrc: t.imgsrc,
				cur_t_dou: EncourageData.userScore.scores_total,
				level: 2,
				TbeanCharge: n
			}), e = 560);
			var c = 220;
			EncourageData.userScore.setpass && (c = 200), a._buyDialog = new $.dialog({
				html: s,
				title: "\u5151\u6362\u9053\u5177",
				width: e,
				height: c
			}), EncourageData.userScore.setpass ? a._buyDialog.element.find(".buy_tpl_right").append(a.util.getFreeInfo(t)) : a._buyDialog.element.find(".buy_tpl_left").append(a.util.getFreeInfo(t)), "1" == t.props_type && a.bindCountEvent(t.scores), a._buyDialog.element.one("click", ".j_confirm_buy", function() {
				var e = {
					props_id: t.props_id
				};
				if("1" == t.props_type && !a.checkCountError()) return a._buyDialog.element.one("click", ".j_confirm_buy", arguments.callee), void 0;
				"1" == t.props_type && (e.buy_num = a._buyDialog.element.find(".j_count").val()), i > 0 && $("#j_charge_checked").length && $("#j_charge_checked")[0].checked && (e.use_fetch_scores = $(".Tbean_num").text()), $.stats.track(t.props_id, "\u8d34\u5427\u5546\u57ce", PageData.page, "\u786e\u5b9a\u5151\u6362");
				var s = function(n) {
					n && $.extend(e, n), a.netProxy.buyProp(e, function(n) {
						var i = "",
							r = "",
							c = a.requireInstance("encourage-payment/widget/TbeanSafe", {
								json: n,
								sucCallback: s,
								content: a
							});
						if(!c.needCheck()) {
							if(0 == n.no) {
								switch(t.props_category) {
									case "107":
										r = '\u5728\u8d34\u5427\u8be6\u60c5\u9875\u70b9\u51fb<img style="vertical-align:middle;" src="/tb/static-tbmall/img/magic_show_icon.png" />\u4f7f\u7528';
										break;
									case "108":
										"1080001" == t.props_id && (r = "\u5728\u7b7e\u5230\u9875\u9762\u4f7f\u7528");
										break;
									case "101":
										r = "\u4f60\u53ef\u4ee5\u5728\u8fd9\u91cc\u4f7f\u7528\u4f60\u7684\u53d1\u8d34\u6c14\u6ce1";
										break;
									case "104":
										r = "\u5728\u53d1\u8d34\u6846\u4e2d\u4f7f\u7528";
										break;
									case "105":
										r = "\u60a8\u5df2\u6210\u529f\u62e5\u6709\u8be5\u52cb\u7ae0\u5bf9\u5e94\u7684\u9053\u5177\u7279\u6743\uff0c\u5feb\u53bb\u4f7f\u7528\u5427\uff01";
										break;
									case "109":
									case "110":
										r = "\u5728\u5f53\u524d\u9875\u9762\u4f7f\u7528";
										break;
									case "113":
										r = "\u5728\u4e2a\u4eba\u4e2d\u5fc3\u4f7f\u7528"
								}
								i = "1" == t.props_type ? "\u5151\u6362" + e.buy_num + "\u4e2a<span class='orange_txt'>" + n.data.title + "</span>\u6210\u529f\uff01<br>" + r : "\u5151\u6362<span class='orange_txt'>" + n.data.title + "</span>\u6210\u529f\uff01\u6709\u6548\u671f\u81f3<span class='orange_txt'>" + a.util.formatDate(n.data.end_time) + "</span><br>" + r
							} else switch(n.no) {
								case 2270005:
									i = "\u54ce\u5440\uff0cT\u8c46\u4e0d\u8db3";
									break;
								case 2270001:
									i = "\u9886\u53d6\u6210\u529f`(*\u2229_\u2229*)\u2032";
									break;
								case 2270004:
									i = "\u60a8\u5df2\u7ecf\u62e5\u6709\u4e86\u66f4\u9ad8\u7ea7\u7684\u52cb\u7ae0\uff0c\u65e0\u9700\u5151\u6362\u672c\u52cb\u7ae0\uff01";
									break;
								case 2270006:
									i = "\u672c\u9053\u5177\u4e0d\u53ef\u91cd\u590d\u5151\u6362";
									break;
								case 360007:
								case 2150040:
									var o = a.requireInstance("encourage-props/widget/captcha_payment", {
										data: n
									});
									return o.showCaptcha(s), void 0;
								case 2270018:
								case 1990005:
								case 2190005:
									n.data = n.data || {};
									var _ = a.requireInstance("encourage-props/widget/paykey_dialog", {
										showType: 2,
										errType: n.no,
										errTime: n.data.wrongtime
									});
									return _.showDialog(s, function() {}, a), void 0;
								default:
									i = "\u54ce\u5440\uff0c\u670d\u52a1\u5668\u62bd\u98ce\u4e86\u3002\u8bf7\u7a0d\u7b49\u4e00\u4f1a~~"
							}
							0 == n.no && ($.inArray(t.props_category, ["109", "110", "114"]) > -1 || "1080002" == t.props_id) ? a.dialog.confirm('<div class="tip">' + i + "</div>", {
								button: [{
									txt: "\u7acb\u5373\u4f7f\u7528",
									extraclass: "j_nameplate_recast1",
									callback: function() {
										a.dialog.close(), "1080002" == t.props_id ? a.requireInstance("encourage-props/widget/ContSignCard") : "1140001" == t.props_id ? $(".j_nameplate_recast").trigger("click") : a.useController.doUse(parseInt(n.data.props_id))
									}
								}, {
									txt: "\u7a0d\u540e\u4f7f\u7528",
									callback: function() {
										a.dialog.close(), $.tb.location.reload()
									}
								}]
							}) : 0 == n.no && $.inArray(t.props_category, ["101"]) > -1 ? (a.dialog.info('<div class="tip tip_center">' + i + '</div><div class="tip_bubble_intro"></div><div class="tip_operation"><input type="checkbox" class="tip_check_box"/>\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u6c14\u6ce1</div>', {
								title: "\u8d2d\u4e70\u6210\u529f",
								width: 475,
								height: 365,
								button: "\u6211\u77e5\u9053\u4e86"
							}), a.dialog.bind("onInfoClose", function() {
								$(".tip_operation .tip_check_box").tbattr("checked") ? $.ajax({
									url: "/tbmall/submit/setBub",
									type: "post",
									dataType: "json",
									data: {
										props_id: t.props_id,
										tbs: PageData.tbs || PageData.user.tbs
									},
									success: function() {
										$.tb.location.reload()
									},
									error: function() {
										$.tb.location.reload()
									}
								}) : $.tb.location.reload()
							})) : (a.dialog.info('<div class="tip">' + i + "</div>"), 0 == n.no && a.dialog.bind("onInfoClose", function() {
								$.tb.location.reload()
							}))
						}
					})
				};
				a._buyDialog.close(), s()
			})
		}
	}
});
_.Module.define({
	path: "encourage-props/widget/tieba_sign_card",
	requires: ["encourage-props/widget/BuyController"],
	sub: {
		initial: function(t) {
			this.opts = t, this.superboy = this.opts.superboy || "";
			var e = localStorage.getItem("tieba_sign_card") || "",
				a = !1,
				s = 0;
			if(e) {
				var i = new Date(+e.split("|")[0] || 0).getDate(),
					r = (new Date).getDate();
				s = e.split("|")[1] || 0, 2 > s && r !== i && (a = !0)
			} else a = !0, s = 0;
			"signcard" === this.superboy && a && (this.showDialog(), localStorage.setItem("tieba_sign_card", +new Date + "|" + ++s))
		},
		showDialog: function() {
			$.stats.track("sign_card0628", "p10029", "frs", "view"), $.stats.track("sign_card0628", "p10030", "frs", "view");
			var t = this,
				e = '<div class="tieba-sign-card-container">     <a href="javascript:;" class="tieba-sign-card-link"></a> </div>',
				a = _.template(e)({
					tdouNum: window.EncourageData.userScore.scores_total
				}),
				s = new $.dialog({
					html: a,
					title: "",
					holderClassName: "tieba-sign-card",
					height: 400,
					width: 500
				});
			s.element.on("click", ".tieba-sign-card-link", function(e) {
				s.close(), t.signCard($(e.target)), $.stats.track("sign_card0628", "p10033", "frs", "click"), $.stats.track("sign_card0628", "p10034", "frs", "click")
			}), s.onclose(function() {
				$.stats.track("sign_card0628", "p10031", "frs", "click"), $.stats.track("sign_card0628", "p10032", "frs", "click")
			})
		},
		signCard: function(t) {
			var e = {};
			e.props_id = "1080001", e.props_category = "108", e.props_type = "1", e.scores = "2669", e.name = "\u8865\u7b7e\u5361", e.imgsrc = "https://imgsa.baidu.com/forum/pic/item/b7aa3ac79f3df8dcd93e4b2acf11728b461028eb.jpg", e.free_user_level = "0", e.time_interval = "0", e.fetch_scores_limit = "2669", e.is_default_usedd = "0";
			window.EncourageData.userScore.scores_total;
			this.requireInstance("encourage-props/widget/BuyController", [t, e])
		}
	}
});